<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	function doSave() 
	{
		if($("#name").val() == '') {
			alert("닉네임을 입력해 주세요.");
			return false;
		}
		
		if($("#title").val() == '') {
			alert("타이틀을 입력해 주세요.");
			return false;
		}
		
		if($("#domain").val() == '') {
			alert("도메인을 입력해 주세요.");
			return false;
		}
		
		if(confirm("저장하시겠습니까?")) {
			document.forms[0].submit();
		}
		
		return false;
	}
</script>
</head>

<body>
<div class="content_top">
	<p class="path">
		<strong>네임스페이스</strong>
	</p>
</div>
<h4>테스트를 수행하기 위해 네임스페이스, 등록, 수정 가능하게 만든 기능입니다.</h4>

<form:form modelAttribute="namespace" action="/service/nspace/write" method="post">
<div class="tbl_type3">
	<table cellspacing="0" border="1">
	<col width="120">
	<col>
	<tr>
		<th>닉네임</th>
		<td>
			<input id="name" name="name" type="text" class="input_txt" style="width: 100%">
		</td>
	</tr>
	<tr>
		<th>타이틀</th>
		<td>
			<input id="title" name="title" type="text" class="input_txt" style="width: 100%">
		</td>
	</tr>
	<tr>
		<th>도메인</th>
		<td>
			<input id="domain" name="domain" type="text" class="input_txt" style="width: 100%">
		</td>
	</tr>
	</table>
</div>
<br>

<div class="div_right">
	<a href="/service/nspace" class="btn_sml"><span>목록보기</span></a>
	<a href="javascript:;" class="btn_sml" onclick="doSave();"><span>등록하기</span></a>
</div>
</form:form>
</body>
</html>